home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-11-01 | 9.3 KB | 238 lines | [TEXT/ALFA] |
-
- Using Alpha as Frontier's external editor
-
- Frontier menu 2.1.1
- November 1997
-
-
- This document explains how to use Alpha as Frontier's external editor.
-
- For help how to use Alpha as an HTML editor see the manual for HTML mode,
- located in the folder HTML mode manual.
-
- Please see the HTML mode home page, http://www.theophys.kth.se/~jl/Alpha.html
- for the latest version of HTML mode and Frontier menu. There you can also
- download the HTML mode manual if you haven't got it already.
-
- The code has been tested with Frontier 4.2.3, but it should work with at
- least 4.2 and above. However, one very useful feature was introduced in
- version 4.2.3. Beginning with this version Frontier adds the suffix .html
- to the file name when sending it to Alpha. This makes Alpha automatically
- switch to HTML mode, which is convenient when you're editing HTML.
-
- Please send comments and bug reports to
-
- Johan Linde, <jl@theophys.kth.se>
-
- Acknowledgments
-
- Almost immediately after I had released Frontier menu 1.0 I got to know that
- Danis Georgiadis <dmg@hyper.gr> also had written some code to integrate
- Alpha and Frontier. He generously gave me his code to freely use together
- with mine. In this version I have taken the parts from his code which
- could easily be integrated with mine and which worked without problems. The
- Frontier database browser and the Scripts menu are both made by him.
- When I made the Frontier shell I used some of Danis' code and some from
- Matlab mode by Stephen Merkowitz <merk@lnf.infn.it>.
-
- What's new in version 2.1.1
-
- • A startup and a shutdown script to be imported into Frontier have been
- added. Together they solve a problem which sometimes prevented the windows to
- be saved into Frontier's database. The shutdown script closes all open
- Frontier windows in Alpha. No more launching of Frontier when closing
- windows in Alpha. Thanks to Mike Carney <mike_carney@mediaone.net> for ideas
- and some code snippets.
- • Various problems for windows with names containing brackets have been
- fixed.
- • See also the version history.
-
- Installation and configuring
-
- Installing verbs into Frontier
-
- The five files
- system.startup.clearAlphaFiles
- shutdown.closeAlphaWindows
- system.verbs.apps.Alpha
- user.html.editors.Alpha
- user.Alpha
- must be imported into Frontier. You find these in the folder
- Frontier verbs. Just double-click the files to import them. Frontier
- will ask for a name of the imported objects. Use the ones suggested.
-
- Upgrading from version 2.0.x
- Only the two files
- system.startup.clearAlphaFiles
- shutdown.closeAlphaWindows
- have to be imported into Frontier. The other three files have not changed
- since version 2.0.x.
-
- Upgrading from version 1.0
- All five files have to be imported into Frontier. The ones distributed with
- Frontier menu 1.0 are not compatible with Frontier menu 2.1.
-
- Other necessary changes to the Frontier database
-
- There are also a few more changes you must do in Frontier:
- • Change the path in user.odbEditors.TextEditor to the path to Alpha,
- otherwise Frontier will use the default editor BBEdit.
- • Similarly change the path in system.verbs.apps.Alpha.appinfo.path
- • A small change must be made to the verb suites.odbEditor.editors.Text.edit
-
- The last lines reads
-
- bundle «send an Apple Event to the editor to open the temp file
- «use an open protocol that's implemented by BBEdit 4.0 and greater
- «the extra parameter to the odoc event is Frontier's app id
- appleEvent (ideditorapp, 'aevt', 'odoc', '----', alias (tempfile), 'FSnd', Frontier.id)
-
- Change them to
- bundle «send an Apple Event to the editor to open the temp file
- if defined(Alpha.id) && ideditorapp == Alpha.id
- Alpha.edit(tempfile)
- else
- «use an open protocol that's implemented by BBEdit 4.0 and greater
- «the extra parameter to the odoc event is Frontier's app id
- appleEvent (ideditorapp, 'aevt', 'odoc', '----', alias (tempfile), 'FSnd', Frontier.id)
-
- This change is needed because Alpha doesn't understand the Apple event used
- in the last line. Hopefully Alpha will understand it in the future so that
- you don't have to make this change in the future. If you decide to switch
- back to your previous editor you don't have to undo the above change. It
- will work as before with any other editor.
-
- Inserting the Frontier menu in the menu bar
-
- The Frontier menu doesn't automatically appear in the menu bar. To insert
- it in the menu bar select Frontier menu in the submenu Config -> Global ->
- Package Menus.
-
- Opening a Frontier text window in Alpha
-
- Text windows in Frontier can be opened in Alpha using Edit with App in
- Frontier's Main menu. Whenever you save changes the Frontier database is
- automatically updated. If you use 'Save as...' in Alpha the new file is
- connected to the same location in the Frontier database as the old one.
- Thus, there is hardly any point in doing 'Save as...'.
-
- You can also use the Frontier database browser, see below.
-
- Frontier menu
-
- Switch to Frontier - Launches Frontier or brings it to front if already
- running.
-
- View in Browser - Makes Frontier render the page and sends it to the
- browser for previewing. This is the same as 'View in
- Browser' in Frontier's Web menu. This should only be used
- for files opened from Frontier. Other HTML files are sent
- to the browser using 'Send File to Browser' in the HTML
- menu.
-
- Frontier Shell - Opens a shell window where you can run Frontier scripts,
- see below.
-
- Browse - Opens a Frontier browser at different points in the database.
- Use Add… and Remove… to edit this menu.
-
- Open - Opens a Frontier window in Frontier. Use Add… and Remove… to
- edit this menu.
-
- Scripts Menu - Rebuilds the Scripts menu and loads the script corresponding
- to the menu items.
-
- Preferences… - To set your preferences for Frontier. Currently you can
- choose if you want to automatically launch Frontier when
- you launch Alpha. This is not done by default.
-
- Scripts menu
-
- The Scripts menu is a menu which you define inside Frontier in the same way as
- you define shared menus for other applications. (The Scripts menu has the
- cowboy menu icon like the Frontier scripts in the Finder.) The menu definition
- must be in user.Alpha.menubar. Alpha does not support menu sharing. Therefore
- there are a few things which differ from how shared menu work. In particular:
-
- • If you launch Frontier after Alpha the menu it not automatically inserted
- in the menubar. You have to use Rebuild Scripts Menu to insert it.
- • Whenever you modify the menu you have to use Rebuild Scripts Menu to
- rebuild it. Note! This has also to be done when you modify a script belonging
- to a menu item.
- • Keybindings for the menu items must be defined the way Alpha defines
- keybindings. Alpha uses certain meta characters to define menu items. See
- the section Menus, User Defined in the general manual.
-
- Frontier database browser
-
- The Frontier database browser lets you navigate through Frontier's
- database without leaving Alpha. You can also open Frontier windows in
- Alpha without leaving Alpha. In the browser windows, tables are red, text
- windows are green, and everything else is blue. To navigate the windows
- you can use key shortcuts similar to those used to navigate Finder windows.
-
- uparrow - move up one line
-
- downarrow - move down one line
-
- rightarrow - rightarrow on a table displays the content of the table.
-
- leftarrow - leftarrow on a table hides the content of the table.
-
- cmd uparrow - opens the parent table in a new window.
-
- cmd-opt uparrow - opens the parent table in a new window and closes the
- current window.
-
- cmd downarrow - cmd downarrow on a table opens a new window with the
- content of that table.
-
- cmd-opt downarrow - cmd-opt downarrow on a table opens a new window with
- the content of that table and closes the current window.
-
- return - opens the selected object for editing. Text objects are opened
- in Alpha, and most other things are opened in Frontier.
-
- Frontier shell
-
- The Frontier shell is an alternative to the Frontier Quick Script window
- for those who like a command history. Type a command and hit return to have it
- executed in Frontier. The return value is then displayed on the next line.
-
- You move up and down the command history using control-uparrow and
- control-downarrow.
-
- Control-u erases the current line.
-
- WARNING! Don't send commands which will make Frontier open an alert window,
- like e.g. dialog.notify. If this window is hidden behind your other
- windows it will freeze your machine with command-option-escape as the only
- way out.
-
- Version history
-
- 2.1.1, 3 November 1997 [update of version 2.0.1]
- • The same as version 2.1 but for Alpha 7.0.
-
- 2.1, 3 November 1997 [update of version 2.0]
- • A startup and a shutdown script to be imported into Frontier have been
- added. Together they solve a problem which sometimes prevented the windows to
- be saved into Frontier's database. The shutdown script closes all open
- Frontier windows in Alpha. Thanks to Mike Carney <mike_carney@mediaone.net>
- for ideas and some code snippets.
- • Various problems for windows with names containing brackets have been
- fixed.
-
- 2.0.1, 19 October 1997
- • Updated to be compatible with Alpha 7.0.
-
- 2.0, 17 August 1997
- • Added a Frontier shell.
- • Added database browser and a Browse submenu.
- • Added the Open submenu.
- • Added Scripts menu, which is defined in Frontier as with other apps.
- • 'Save as...' works now.
-
- 1.0, 20 July 1997
- First public release.
-